package com.yyfax.pay.depository.service.inner;

import com.yyfax.pay.common.model.vo.ValidResult;
import com.yyfax.pay.depository.domain.FuiouChangeCard;
import com.yyfax.pay.depository.vo.FuiouChangeCardVO;
import com.yyfax.pay.third.model.to.file.UploadNotifyReq;
import com.yyfax.pay.third.model.to.fuioudeposit.ChangeUserInfoNotifyReq;
import com.yyfax.pay.vo.depository.UserChangeCardReq;
import com.yyfax.pay.vo.depository.UserChangeCardReq2;

/**
 * 更换银行卡服务
 *
 * @author yejc
 * @date 2017-09-26
 * @since v1.0.0
 */
public interface FuiouChangeCardService {

	/**
	 * 用户更换银行卡
	 *
	 * @author yejc
	 * @date 2017-09-20
	 * @since v2.0.0
	 */
	public FuiouChangeCard userChangeCard(UserChangeCardReq req, String merchantCode);

	/**
	 * 处理更换银行卡通知
	 *
	 * @author yejc
	 * @date 2017-09-26
	 * @since v2.0.0
	 * @param req
	 * @param merchantCode
	 */
	public void handleChangeCardNotify(ChangeUserInfoNotifyReq req, String merchantCode);

	/**
	 * 更新用户支付信息中的银行卡相关信息
	 *
	 * @author yejc
	 * @date 2017-09-30
	 * @since v2.0.2
	 * @param merchantCode
	 * @param merchantUserId
	 * @param newBankCardNo
	 */
	public void updateUserPaymentBankCard(String merchantCode, String merchantUserId, String newBankCardNo);

	/**
	 * 用户更换银行卡参数校验
	 *
	 * @author yejc
	 * @date 2017-09-30
	 * @since v2.0.0
	 * @param merchantCode
	 * @param bankCode
	 * @param image1
	 * @param image2
	 * @return
	 */
	public ValidResult validateChangeCard(String merchantCode, String bankCode, String image1, String image2);

	/**
	 * 校验换卡请求参数
	 * 
	 * @author buyi
	 * @date 2018-03-29 11:02:06
	 * @since v2.1.3
	 * @param merchantCode
	 * @param orderId
	 * @param bankCode
	 * @param imageFile
	 * @return
	 */
	public ValidResult validChangeCardNew(String merchantCode, String orderId, String bankCode, String... imageFiles);

	/**
	 * 保存更换银行订单
	 * 
	 * @author buyi
	 * @date 2018-03-29 11:13:20
	 * @since v2.1.3
	 * @param merchantCode
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public FuiouChangeCardVO save(String merchantCode, UserChangeCardReq2 params) throws Exception;

	/**
	 * 更换银行卡<br>
	 * 
	 * @author buyi
	 * @date 2018-03-29 11:06:54
	 * @since v2.1.3
	 * @param merchantCode
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public FuiouChangeCard userChangeCard(FuiouChangeCard po) throws Exception;

	/**
	 * 解析更换银行卡图片上传结果，并触发银行卡更换请求
	 * 
	 * @author buyi
	 * @date 2018-03-30 09:01:54
	 * @since v2.1.3
	 * @param merchantCode
	 * @param req
	 */
	public void parseImageUploadResultForFileServer(String merchantCode, UploadNotifyReq req);
}
